import { Component, OnInit } from '@angular/core';

interface Info {
  key: string;
  description: string;
  url: string | null;
}

@Component({
  selector: 'app-base-about-tab',
  templateUrl: './about-tab.component.html',
  styleUrls: ['./about-tab.component.less']
})
export class AboutTabComponent implements OnInit {
  projects: Info[] = [];
  packages: Info[] = [];

  constructor() {}

  ngOnInit(): void {
    this.projects.push({ key: '名称', description: 'NG-KEYCLOAK-ADMIN', url: null });
    this.projects.push({ key: '版本', description: '0.0.1', url: null });
    this.projects.push({ key: 'Gitee', description: '源代码', url: 'https://gitee.com/pinweiwan/ng-keycloak-admin/' });

    this.packages.push({ key: 'angular', description: "The modern web developer's platform", url: 'https://angular.io/' });
    this.packages.push({ key: 'keycloak-angular', description: 'Easy Keycloak setup for Angular applications.', url: 'https://github.com/mauriciovigolo/keycloak-angular' });
    this.packages.push({ key: 'keycloak-js', description: 'Open Source Identity and Access Management For Modern Applications and Services', url: 'https://github.com/keycloak/keycloak' });
    this.packages.push({
      key: 'ng-zorro-antd',
      description: '遵循 Ant Design 设计规范的 Angular UI 组件库，主要用于研发企业级中后台产品。全部代码开源并遵循 MIT 协议，任何企业、组织及个人均可免费使用',
      url: 'https://ng.ant.design/docs'
    });
    this.packages.push({ key: 'ngx-pipes', description: 'Useful pipes for Angular with no external dependencies', url: 'https://github.com/danrevah/ngx-pipes' });
    this.packages.push({
      key: 'ngx-quicklink',
      description: 'It provides router preloading strategy which automatically downloads the lazy-loaded modules associated with all the visible links on the screen.',
      url: 'https://github.com/mgechev/ngx-quicklink'
    });
  }
}
